//
//  ITNetWorkManager.h
//  GLPFinance
//
//  Created by ITBE on 16/10/28.
//  Copyright © 2016年 intube. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "ITNetWorkHelper.h"
@interface ITNetWorkManager : NSObject
+(id)defaultManager;

@property(nonatomic, strong)NSURLSession *defaultSession;

-(NSDictionary *) defaultHeader;

/**goRequest 有 member验证  request 无验证*/
- (NSURLSessionDataTask *)goRequest:(NSString *)uri method:(NSString *)method parameters:(id)parameters callback:(ApiSuccessCallback)callback;

- (NSURLSessionDataTask *)request:(NSString *)uri method:(NSString *)method parameters:(id)parameters callback:(ApiSuccessCallback)callback;

- (NSURLSessionDataTask *)post:(NSString *)uri parameters:(id)parameters callback:(ApiSuccessCallback)callback;

- (NSURLSessionDataTask *)get:(NSString *)uri parameters:(id)parameters callback:(ApiSuccessCallback)callback;


- (NSURLSessionDataTask *)put:(NSString *)uri parameters:(id)parameters callback:(ApiSuccessCallback)callback;

- (NSURLSessionDataTask *)doDelete:(NSString *)uri parameters:(id)parameters callback:(ApiSuccessCallback)callback;


- (void)downloadFileWithOption:(NSDictionary *)paramDic
                 withInferface:(NSString*)requestURL
                     savedPath:(NSString*)savedPath
               downloadSuccess:(ApiSuccessCallback)success
               downloadFailure:(ApiFailedCallback)failure
                      progress:(ApiDownloadFileProgress)progress;

- (void)uploadImage:(UIImage *)image uri:(NSString *)uri parameters:(id)parameters  success:(ApiSuccessCallback)success failed:(ApiFailedCallback)failed;
@end
